<template>
  <a-spin :spinning="false">
    <a-card style="margin-top: 12px" :bordered="true" :title="dataObject.title">
      <div slot="extra">
<!--        总分: <i style='font-style: normal;color: rgba(0, 0, 0, 0.85);font-weight: 500;font-size: 16px;'>{{ score.score }}</i>-->
        总分: <i style='font-style: normal;color: rgba(0, 0, 0, 0.85);font-weight: 500;font-size: 16px;'>{{dataObject.score}}</i>
        <a-button style="margin-left: 20px" :icon="this.getIconShow" @click="showButtomShow"> {{ this.getButtomShow }}</a-button>
      </div>
      <div>
        <component v-if='this.isShow' :is="dataObject.component" :teacher-id="teacherId" :dataObject="dataObject" ></component>
      </div>
      <template slot="actions">
        <component is="ProjectsClassificationResultRankingV1" :ranking-data="dataObject.rankingData" :show-range='dataObject.showRange'></component>
      </template>
    </a-card>
  </a-spin>
</template>

<script>
import ProjectsClassificationResultRankingV1
  from '@views/dashboard/gfxy/assessmentResult/commons/ProjectsClassificationResultRankingV1.vue'
import { getAction } from '@api/manage'
import BaseResultListItemV1 from '@views/dashboard/gfxy/assessmentResult/commons/BaseResultListItemV1.vue'
import ResearchResultListItemV1 from '@views/dashboard/gfxy/assessmentResult/commons/ResearchResultListItemV1.vue'
import TeacherYearAssessmentResultForClasstimeV1
  from '@views/dashboard/gfxy/assessmentResult/yearAssessment/TeacherYearAssessmentResultForClasstimeV1.vue'
import TeacherYearAssessmentResultForEducationAndServiceItemsV1
  from '@views/dashboard/gfxy/assessmentResult/yearAssessment/TeacherYearAssessmentResultForEducationAndServiceItemsV1.vue'

export default {
  name: 'ProjectsClassificationResultV1',
  components: { TeacherYearAssessmentResultForEducationAndServiceItemsV1, TeacherYearAssessmentResultForClasstimeV1,ResearchResultListItemV1, BaseResultListItemV1, ProjectsClassificationResultRankingV1 },
  props:{
    teacherId:{
      type:String,
      required: true
    },
    dataObject:{
      type: Object,
      required: true
    }
  },
  data(){
    return {
      isShow:false,
    }
  },computed:{
    getButtomShow(){
      if(this.isShow){
        return "隐藏详情"
      } else {
        return "显示详情"
      }
    },
    getIconShow(){
      if(this.isShow){
        return "up-circle"
      } else {
        return "down-circle"
      }
    }
  },
  methods: {
    showButtomShow(){
      this.isShow = !this.isShow
    },

  },
  mounted() {

  }
}
</script>

<style scoped>

</style>